﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using shop.entity;
using shop.dao;
namespace shop.service
{
    public class CatagoryService
    {
        private CatagoryDao catagoryDao = new CatagoryDao();
        public Catagory getCatagory(int id){
            return catagoryDao.GetCatagory(id);
        }

        public List<Catagory> ListCatagory()
        {
            return catagoryDao.ListCatagory();
        }

        public int Add(Catagory catagory)
        {
            return catagoryDao.AddCatagory(catagory);
        }
       
        public bool DeleteCatagory(int id)
        {
            return catagoryDao.DeleteCatagory(id);
        }

        public bool UpdateCatagory(Catagory catagory)
        {
            return catagoryDao.UpdateCatagory(catagory);
        }
    }
}